<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "spider_content".
 *
 * @property int $id
 * @property string $title
 * @property string $cover_img
 * @property string $content
 * @property string $source
 * @property int $send_time
 * @property int $create_time
 */
class SpiderContent extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'spider_content';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['title', 'content', 'source', 'create_time'], 'required'],
            [['content'], 'string'],
            [['send_time', 'create_time'], 'integer'],
            [['title'], 'string', 'max' => 128],
            [['cover_img'], 'string', 'max' => 512],
            [['source'], 'string', 'max' => 64],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => 'Title',
            'cover_img' => 'Cover Img',
            'content' => 'Content',
            'source' => 'Source',
            'send_time' => 'Send Time',
            'create_time' => 'Create Time',
        ];
    }
}
